1. Field of the Invention
The invention relates to an image encoding apparatus and, more particularly, an image encoding apparatus using an orthogonal conversion encoding.
2. Related Background Art
As an apparatus using an image encoding apparatus, for example, a digital VTR for digitizing an image signal and recording and reproducing the digital signal has been known hitherto. In such a digital VTR, a compression encoding technique for compressing image data and recording and reproducing the compressed image data is used. As a technique for high efficiently compressing and encoding image data, an orthogonal conversion encoding system is known. According to such a system, after the image data was divided into blocks every plural pixels, an orthogonal conversion such as a discrete cosine transformation (hereinafter, simply referred to as a DCT) or the like is executed and a quantization, an entropy encoding, and the like are performed to coefficients after completion of the conversion.
FIG. 1 shows a schematic construction of a conventional image encoding apparatus which is used for the DCT. In FIG. 1, reference numeral 100 denotes digital image data which is inputted; 101 a memory to record the image data 100; 103 a DCT circuit for reading out image data 102 stored in the memory 101 on a block unit basis of a predetermined size and discrete cosine transforming and outputting DCT conversion coefficients (DCT coefficients) 105; 106 a buffer for delaying the DCT coefficients 105; 108 a quantization circuit for quantizing the delayed DCT coefficients; 107 an activity discrimination circuit for discriminating an activity of the image data in a frequency area from an AC coefficient 104 in the DCT coefficients 105; 109 a quantization control circuit for controlling the quantization circuit 108 on the basis of the activity of the image judged by the activity discrimination circuit 107; 110 an encoding circuit for variable length encoding quantization data by using, for example, both of a run length encoding and a two-dimensional Huffman encoding; 111 an encoding control circuit for controlling the encoding circuit 110; and 112 encoding data which was variable length encoded.
The operation will now be described. In the memory 101, the input image data 100 is divided into blocks of (8 pixelsxc3x978 pixels) on a frame unit basis and, at the same time, a shuffling or the like of the blocks is executed, and the resultant image data is read out. The image data 102 read out from the memory 101 is supplied to the DCT circuit 103. The DCT circuit 103 performs a DCT to the image data 102 every block of (8xc3x978) pixels, converts the image data 102 from a space area to the data of a frequency area, and generates the DCT coefficients 105 as conversion coefficients. FIG. 2 shows a construction of the data of the DCT coefficients 105 of the block of (8xc3x978) pixels. As shown in the diagram, one block is constructed by: a DC coefficient indicative of a mean luminance level of 64 (=8xc3x978) pixels; and an AC coefficient indicative of frequency distributions in the horizontal and vertical directions of an image.
Generally, correlations regarding the time and space of a motion image such as a TV signal or the like are strong. When such a motion image is DCT converted to the data of a frequency area, components are concentratedly distributed in a relatively low frequency area. On the other hand, the discriminating characteristics of the human eyes are sharp for a low frequency, namely, a flat image and are dull for a high frequency, namely, a high active image. Therefore, by finely quantizing a low frequency area and coarsely quantizing a high frequency area, a quantization distortion is concentrated to a high frequency portion of the image. A deterioration of a picture quality on a visual sense can be suppressed.
From the above principle, the activity discrimination circuit 107 of the image obtains an activity of the image data from the AC coefficient 104 and provides activity information corresponding to the activity to the quantization control circuit 109.
The quantization circuit 108 divides the DCT coefficients 105 into four areas from the low frequency area to the high frequency area as shown in, for example, FIG. 3 by a control of the quantization control circuit 109 and executes a quantization while making quantization steps coarse in accordance with the order of [area 0 less than area 1 less than area 2 less than area 3]. The buffer 106 delays the data by a time corresponding to the delay which is caused until the quantization level is controlled on the basis of the data of the DCT coefficients 105 which were DCT converted.
The encoding circuit 110 zigzag scans the quantization data which is two-dimensionally arranged and which is obtained from the quantization circuit 108 in the direction from a low space frequency to a high space frequency, thereby changing to the one-dimensional data. After that, the encoding circuit variable length encodes the zero coefficients by a run length encoding and also variable length encodes the non-zero coefficients by a two-dimensional Huffman encoding and generates the encoding data 112. In the run length encoding, the data is reversely compressed by counting the zero run. In the Huffman encoding, a short code word is allocated to the data having a high occurrence probability and a long code word is allocated to the data having a low occurrence probability, thereby averagely reducing an information amount.
As mentioned above, in the conventional image encoding apparatus, the quantization control is executed on the basis of the activity information of the image data. However, in case of quantizing a chrominance signal, since there is a difference between the human visual sense characteristics of the I axis (orangexe2x80x94cyan axis) system and the Q axis (yellow greenxe2x80x94purple axis) system, it is undesirable to equally handle both of them. Particularly, there is a problem such that a deterioration of the picture quality is conspicuous in an image having a hue of the red system that can be easily perceived by the human being.
According to the discriminating characteristics of the human eyes to recognize an image, it is known that even in case of objects having the same hue, a visual recognizing performance changes depending on its brightness.
FIGS. 4A and 4B show such a state. FIG. 4A is a characteristics graph of an image of a high luminance level. FIG. 4B is a characteristics graph of an image of a low luminance level. In each of FIGS. 4A and 4B, the height direction shows an amplitude of the image and a lateral direction indicates a time. Generally, there is a tendency such that as for the luminance information and color information of the image, since a band of the latter information is narrow, outlines of chrominance signals (C1, C2) are widened in the time direction as shown in the diagrams for luminance signals (Y1, Y2). Visually, the visual recognition for the outline of the luminance signal is dominant and the perception of a color blur is hard to be discriminated.
However, the perception of the color blur is largely influenced in accordance with the luminance level and the color blur of the low luminance image of FIG. 4B is visually more conspicuous than the color blur of the high luminance image of FIG. 4A.
There is a problem such that the color blur in the low luminance image visually causes an S/N feeling and a resolution feeling to be deteriorated. This suggests that the optimum band of the chrominance signal exists in accordance with the luminance level of the image.
Under such circumstances, it is an object of the invention to provide an image encoding apparatus which can reduce a deterioration in picture quality due to a hue.
According to a preferred embodiment of the invention, the above object is accomplished by an image encoding apparatus comprising: orthogonal converting means for orthogonal converting image data that is inputted every block consisting of a plurality of pixels and obtaining conversion coefficients; quantizing means for quantizing the conversion coefficients; detecting means for detecting specific color information from the image data; control means for controlling quantizing characteristics of the quantizing means on the basis of a detection result of the detecting means; and encoding means for encoding quantization data that is obtained from the quantizing means.
Another object of the invention is to provide an image encoding apparatus which can reduce a deterioration in picture quality in case of a low luminance.
According to a preferred embodiment, the above object is accomplished by an image encoding apparatus comprising: orthogonal converting means for orthogonal converting image data which is inputted every block consisting of a plurality of pixels and obtaining conversion coefficients; quantizing means for quantizing the conversion coefficients; detecting means for detecting a luminance level of the image data; control means for controlling quantizing characteristics of the quantizing means on the basis of a detection result of the detecting means; and encoding means for encoding quantization data which is obtained from the quantizing means.
Other objects, features and advantages of the invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings.